package org.xiaojl.modules.drp.entity;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import org.xiaojl.utils.ToolUtil;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotations.TableName;
import org.xiaojl.common.base.BaseEntity;

/**
 * <p>
 * 商品
 * </p>
 *
 * @author xiaojl
 * @since 2017-09-11
 */
@TableName("drp_product")
public class DrpProduct extends BaseEntity<DrpProduct> {

    private static final long serialVersionUID = 1L;

    /**
     * 名称
     */
	private String name;
    /**
     * 图片
     */
	private String img;
    /**
     * 采购价
     */
	private BigDecimal purchasePrice;
    /**
     * 售价
     */
	private BigDecimal salePrice;
    /**
     * 优惠价
     */
	private BigDecimal preferentialPrice;
    /**
     * 上架状态：0-未上架，1-已上架
     */
	private Integer upStatus;
    /**
     * 所属供货商
     */
	private String supplierId;
    /**
     * 商品类型
     */
	private String productType;
    /**
     * 型号
     */
	private String models;
    /**
     * 材质
     */
	private String texture;
    /**
     * 功能作用
     */
	private String effect;
    /**
     * 备注
     */
	private String remark;

	@Override
	public Wrapper<DrpProduct> bindingQueryWrapper() {
		Wrapper<DrpProduct> wrapper = new EntityWrapper<DrpProduct>();
		if(ToolUtil.isNotEmpty(this.name)){
			wrapper.like("name", this.name);
		}
		if(ToolUtil.isNotEmpty(this.img)){
			wrapper.like("img", this.img);
		}
		if(ToolUtil.isNotEmpty(this.upStatus)){
			wrapper.eq("upStatus", this.upStatus);
		}
		if(ToolUtil.isNotEmpty(this.supplierId)){
			wrapper.like("supplierId", this.supplierId);
		}
		if(ToolUtil.isNotEmpty(this.productType)){
			wrapper.like("productType", this.productType);
		}
		if(ToolUtil.isNotEmpty(this.models)){
			wrapper.like("models", this.models);
		}
		if(ToolUtil.isNotEmpty(this.texture)){
			wrapper.like("texture", this.texture);
		}
		if(ToolUtil.isNotEmpty(this.effect)){
			wrapper.like("effect", this.effect);
		}
		if(ToolUtil.isNotEmpty(this.remark)){
			wrapper.like("remark", this.remark);
		}
		return wrapper;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public BigDecimal getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(BigDecimal purchasePrice) {
		this.purchasePrice = purchasePrice;
	}

	public BigDecimal getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(BigDecimal salePrice) {
		this.salePrice = salePrice;
	}

	public BigDecimal getPreferentialPrice() {
		return preferentialPrice;
	}

	public void setPreferentialPrice(BigDecimal preferentialPrice) {
		this.preferentialPrice = preferentialPrice;
	}

	public Integer getUpStatus() {
		return upStatus;
	}

	public void setUpStatus(Integer upStatus) {
		this.upStatus = upStatus;
	}

	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}

	public String getProductType() {
		return productType;
	}

	public void setProductType(String productType) {
		this.productType = productType;
	}

	public String getModels() {
		return models;
	}

	public void setModels(String models) {
		this.models = models;
	}

	public String getTexture() {
		return texture;
	}

	public void setTexture(String texture) {
		this.texture = texture;
	}

	public String getEffect() {
		return effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
